package com.jm.reggie.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 配置常量加载类
 */
@Component
public class ConstantPropertiesUtils implements InitializingBean {

    @Value("${rly.sms.accountSId}")
    private String accountSId;

    @Value("${rly.sms.accountToken}")
    private String accountToken;

    @Value("${rly.sms.appId}")
    private String appId;

    public static String ACCOUNT_SID;
    public static String ACCOUNT_TOKEN;
    public static String APP_ID;

    @Override
    public void afterPropertiesSet() throws Exception {
        ACCOUNT_SID=accountSId;
        ACCOUNT_TOKEN=accountToken;
        APP_ID=appId;
    }
}

